<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Impacts on Utility Programs</title>
    <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
    <link rel="start" href="index.html" title="Getting Started with Distributed Berkeley DB Applications" />
    <link rel="up" href="server.html" title="Chapter 2. Berkeley DB Server" />
    <link rel="prev" href="config.html" title="Configuring the Server" />
    <link rel="next" href="client.html" title="Chapter 3. Berkeley DB Client Driver APIs" />
  </head>
  <body>
    <div xmlns="" class="navheader">
      <div class="libver">
        <p>Library Version 12.1.6.2</p>
      </div>
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">Impacts on Utility Programs</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="config.html">Prev</a> </td>
          <th width="60%" align="center">Chapter 2. Berkeley DB Server</th>
          <td width="20%" align="right"> <a accesskey="n" href="client.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <div class="titlepage">
        <div>
          <div>
            <h2 class="title" style="clear: both"><a id="utilities"></a>Impacts on Utility Programs</h2>
          </div>
        </div>
      </div>
      <div class="toc">
        <dl>
          <dt>
            <span class="sect1">
              <a href="utilities.html#secondary_db">Secondary Databases</a>
            </span>
          </dt>
        </dl>
      </div>
      <p>
            All Berkeley DB utility programs can be run on environments and
            databases managed by Berkeley DB servers. For example, you can use
            <code class="literal">db_hotbackup</code> to backup databases, or
            <code class="literal">db_stat</code> to get database statistics. 
        </p>
      <p>
            The following constraints apply when running utility programs on
            managed environments and databases that are accessed simultaneously
            by other processes: 
        </p>
      <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
        <h3 class="title">Note</h3>
        <p>
                Constraints do not apply if the accessed environment or
                database has no client handles opened or if the server is
                offline. 
            </p>
      </div>
      <div class="itemizedlist">
        <ul type="disc">
          <li>
            <p><a id="utility.db_archive"></a>
                    <span class="bold"><strong>db_archive</strong></span>
                </p>
            <p> No constraint applies. </p>
            <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
              <h3 class="title">Note</h3>
              <p>
                        If <span class="emphasis"><em>root.data</em></span> and/or
                        <span class="emphasis"><em>root.log</em></span> are different from
                        <span class="emphasis"><em>root.home</em></span>, you need a
                        <code class="literal">DB_CONFIG</code> file which sets the
                        proper paths using the <code class="literal">add_data_dir</code> ,
                        or <code class="literal">set_lg_dir</code> configuration
                        parameters.
                    </p>
            </div>
          </li>
          <li>
            <p><a id="utility.db_dump"></a>
                    <span class="bold"><strong>db_dump</strong></span>
                </p>
            <p> 
                    Options <code class="literal">-d, -R</code> and
                    <code class="literal">-r</code> cannot be used on databases
                    actively accessed by clients.
                </p>
          </li>
          <li>
            <p><a id="utility.db_load"></a>
                    <span class="bold"><strong>db_load</strong></span>
                </p>
            <p>
                    <code class="literal">db_load</code> cannot be used on databases
                    actively accessed by clients.
                </p>
            <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
              <h3 class="title">Note</h3>
              <p> 
                        If <span class="emphasis"><em>root.blob</em></span> is different from
                        <span class="emphasis"><em>root.home</em></span>, you need to set the
                        proper blob path using the <code class="literal">-b</code> option.
                    </p>
            </div>
          </li>
          <li>
            <p><a id="utility.db_log_verify"></a>
                    <span class="bold"><strong>db_log_verify</strong></span>
                </p>
            <p> No constraint applies. </p>
            <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
              <h3 class="title">Note</h3>
              <p> 
                        If <span class="emphasis"><em>root.log</em></span> is different from
                        <span class="emphasis"><em>root.log</em></span>, you need a
                        <code class="literal">DB_CONFIG</code> file which sets the
                        proper path using the <code class="literal">set_lg_dir</code>
                        configuration parameter. 
                    </p>
            </div>
          </li>
          <li>
            <p><a id="utility.db_printlog"></a>
                    <span class="bold"><strong>db_printlog</strong></span>
                </p>
            <p> No constraint applies. </p>
            <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
              <h3 class="title">Note</h3>
              <p>
                        If <span class="emphasis"><em>root.log</em></span> is different from
                        <span class="emphasis"><em>root.log</em></span>, you need a
                        <code class="literal">DB_CONFIG</code> file which sets the
                        proper path using the <code class="literal">set_lg_dir</code>
                        configuration parameter. 
                    </p>
            </div>
          </li>
          <li>
            <p><a id="utility.db_recover"></a>
                    <span class="bold"><strong>db_recover</strong></span>
                </p>
            <p>
                    <code class="literal">db_recover</code> cannot be used on environments
                    actively accessed by clients. 
                </p>
            <p>
                    <code class="literal">db_recover</code> must have exclusive access to
                    the environment being recovered. An alternative way to perform
                    normal recovery of an environment is to open the environment
                    with the <code class="literal">DB_RECOVER</code> flag from a client
                    application.
                </p>
          </li>
          <li>
            <p><a id="utility.db_replicate"></a>
                    <span class="bold"><strong>db_replicate</strong></span>
                </p>
            <p>
                    <code class="literal">db_replicate</code> cannot be used on databases
                    managed by Berkeley DB servers. 
                </p>
            <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
              <h3 class="title">Note</h3>
              <p>
                        Replication is not supported by Berkeley DB servers.
                        Therefore, even when the server is offline,
                        <code class="literal">db_replicate</code> still cannot be used
                        on databases managed by Berkeley DB server. 
                    </p>
            </div>
          </li>
          <li>
            <p><a id="utility.db_sql_codegen"></a>
                    <span class="bold"><strong>db_sql_codegen</strong></span>
                </p>
            <p>
                    <code class="literal">db_sql_codegen</code> does not access
                    environments or databases, and is irrelevant.
                </p>
          </li>
          <li>
            <p><a id="utility.dbsql"></a>
                    <span class="bold"><strong>dbsql</strong></span>
                </p>
            <p>
                    <code class="literal">dbsql</code> cannot be used on databases managed
                    by Berkeley DB servers because they are not created with the
                    SQL APIs.
                </p>
          </li>
          <li>
            <p><a id="utility.db_stat"></a>
                    <span class="bold"><strong>db_stat</strong></span>
                </p>
            <p> 
                    Options <code class="literal">-r</code> and <code class="literal">-R</code>
                    cannot be used on databases managed by Berkeley DB servers
                    because replication is not supported. 
                </p>
          </li>
          <li>
            <p><a id="utility.db_upgrade"></a>
                    <span class="bold"><strong>db_upgrade</strong></span>
                </p>
            <p>
                    <code class="literal">db_upgrade</code> cannot be used on databases
                    actively accessed by clients. 
                </p>
          </li>
          <li>
            <p><a id="utility.db_verify"></a>
                    <span class="bold"><strong>db_verify</strong></span>
                </p>
            <p>
                    <code class="literal">db_verify</code> cannot be used on databases
                    actively accessed by clients. 
                </p>
            <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
              <h3 class="title">Note</h3>
              <p>
                    If <span class="emphasis"><em>root.blob</em></span> is different from
                    <span class="emphasis"><em>root.home</em></span>, you need to set the
                    proper blob path using the <code class="literal">-b</code> option.
                    </p>
            </div>
          </li>
          <li>
            <p><a id="utility.sqlite3"></a>
                    <span class="bold"><strong>sqlite3</strong></span>
                </p>
            <p>
                    <code class="literal">sqlite3</code> cannot be used on databases
                    managed by Berkeley DB servers.
                </p>
          </li>
        </ul>
      </div>
      <div class="sect1" lang="en" xml:lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h2 class="title" style="clear: both"><a id="secondary_db"></a>Secondary Databases</h2>
            </div>
          </div>
        </div>
        <p>
                To manage secondary keys created for secondary databases, an
                auxiliary database is maintained on the server for each
                secondary database. If the secondary database is file based, the
                auxiliary database is also file based. If the secondary database
                is in-memory, the auxiliary database is also in-memory.
            </p>
        <p> 
                For file-based auxiliary databases, its file name is
                constructed by appending <code class="literal">"__aux.db"</code> to the
                file name of its corresponding secondary database. For example,
                if the file name of a secondary database is
                <code class="literal">"secondary"</code>, the file name of its
                corresponding auxiliary database is
                <code class="literal">"secondary__aux.db"</code>. 
            </p>
        <p>
                Make sure that the auxiliary database is in sync with its
                corresponding secondary databases. Otherwise, operations on the
                secondary database may fail. For example, when backing up or
                restoring databases, the secondary databases and their
                corresponding auxiliary databases must be backed up or restored
                together. When restoring databases, the databases must be
                restored together. 
            </p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="config.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="server.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="client.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">Configuring the Server </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> Chapter 3. Berkeley DB Client Driver APIs</td>
        </tr>
      </table>
    </div>
  </body>
</html>
